namespace MauiSampleDemo.Samples.Animations;

public partial class InstrumentBoardDemo : ContentPage
{
    public InstrumentBoardDemo()
    {
        InitializeComponent();
    }

    protected override void OnAppearing()
    {
        base.OnAppearing();
        //Animation animation = new Animation(v => image.TranslationY = v, 0, 75);
        //animation.Commit(this, "animation_custome");
    }

    private void Button_Clicked(object sender, EventArgs e)
    {
        Animation animation = new Animation() {
            {0,1,new Animation(v=> image.Rotation =v,45,315,Easing.CubicInOut) }
        };
        animation.Commit(this, "custom", 16, 2000);
    }

    private void Button_Clicked_10(object sender, EventArgs e)
    {
        Animation animation = new Animation() {
            {0,1,new Animation(v=> image.Rotation =v,45,45+10*2.7,Easing.CubicInOut) }
        };
        animation.Commit(this, "custom", 16, 2000);
    }

    private void Button_Clicked_20(object sender, EventArgs e)
    {
        Animation animation = new Animation() {
            {0,1,new Animation(v=> image.Rotation =v,45,45+20*2.7,Easing.CubicInOut) }
        };
        animation.Commit(this, "custom", 16, 2000);
    }

    private void Button_Clicked_30(object sender, EventArgs e)
    {
        Animation animation = new Animation() {
            {0,1,new Animation(v=> image.Rotation =v,45,45+30*2.7,Easing.CubicInOut) }
        };
        animation.Commit(this, "custom", 16, 2000);
    }

    private void Button_Clicked_40(object sender, EventArgs e)
    {
        Animation animation = new Animation() {
            {0,1,new Animation(v=> image.Rotation =v,45,45+40*2.7,Easing.CubicInOut) }
        };
        animation.Commit(this, "custom", 16, 2000);
    }

    private void Button_Clicked_50(object sender, EventArgs e)
    {
        Animation animation = new Animation() {
            {0,1,new Animation(v=> image.Rotation =v,45,45+50*2.7,Easing.CubicInOut) }
        };
        animation.Commit(this, "custom", 16, 2000);
    }
    private void Button_Clicked_60(object sender, EventArgs e)
    {
        Animation animation = new Animation() {
            {0,1,new Animation(v=> image.Rotation =v,45,45+60*2.7,Easing.CubicInOut) }
        };
        animation.Commit(this, "custom", 16, 2000);
    }
    private void Button_Clicked_70(object sender, EventArgs e)
    {
        Animation animation = new Animation() {
            {0,1,new Animation(v=> image.Rotation =v,45,45+70*2.7,Easing.CubicInOut) }
        };
        animation.Commit(this, "custom", 16, 2000);
    }
    private void Button_Clicked_80(object sender, EventArgs e)
    {
        Animation animation = new Animation() {
            {0,1,new Animation(v=> image.Rotation =v,45,45+80*2.7,Easing.CubicInOut) }
        };
        animation.Commit(this, "custom", 16, 2000);
    }
    private void Button_Clicked_90(object sender, EventArgs e)
    {
        Animation animation = new Animation() {
            {0,1,new Animation(v=> image.Rotation =v,45,45+90*2.7,Easing.CubicInOut) }
        };
        animation.Commit(this, "custom", 16, 2000);
    }
    private void Button_Clicked_100(object sender, EventArgs e)
    {
        Animation animation = new Animation() {
            {0,1,new Animation(v=> image.Rotation =v,45,45+100*2.7,Easing.CubicInOut) }
        };
        animation.Commit(this, "custom", 16, 2000);
    }
}